﻿using System;
using System.Collections.Generic;
using System.Text;
using DALFactory.DataBase;
using AppToolKit.Core.Context.Spring;
using System.Data;

namespace BLL.Business
{
   public class TaskListBusinessDao
    {
       [AutoWiring]
       public AccessHelper AccessHelperHolder { get; set; }

       public DataSet GetTaskListAll(string hotelid)
       {
           //string strSql = string.Format("select distinct t.code id,t.descript txt, '' pid ,isnull(a.choose,'false') choose  from tasklist t left outer join allot_tasklist a on t.code=a.tasklist_code and a.hotelid='{0}' order by t.code", hotelid);
           string strSql = string.Format("select distinct t.code id,t.descript txt, '' pid ,isnull(a.choose,'false') choose  from tasklist t , allot_tasklist a  where t.code*=a.tasklist_code and a.hotelid='{0}' order by t.code", hotelid);
          return AccessHelperHolder.GetDataSet(CommandType.Text, strSql);
       }
       public DataSet GetDistinctTaskList()
       {
           string strSql = "select distinct tasklist_code,t.time,job_action from  allot_tasklist a,tasklist t where t.code=a.tasklist_code and   t.halt='False'";
           return AccessHelperHolder.GetDataSet(CommandType.Text, strSql);
       }
    }
}
